#ifndef _CUDA_MAP_RBM_CUH_
#define _CUDA_MAP_RBM_CUH_
/* 
   map method designed specially for RBM update 
*/
namespace cuda_map{       
    /* mask for RBM method */
    const int RBM_MAP_MASK            = 0x10;

    /* scaled data */
    const int RBM_SCALE               = 0x11;
    /* map with sigmoid then store*/
    const int RBM_SIGMOID             = 0x12;
    /* scale the data by sigma^2*/
    const int RBM_SCALE_SIGMA_SQR     = 0x13;

    /* 
       normalize using the rule of maxpooling,
       this method only works for 
       shape of block shall be exactly <16,16> 
       on other block shape, error will occur
       
       we ensure 
                 cuda_matrix::conv2_r_valid 
       satisfy the constraint
    */
    const int RBM_MAXPOOL_1616        = 0x14;                
    
    /*------------host functions --------------*/
    
    /* set the constant scale in RBM_SCALE */
    inline void set_scale( float scale );

    /* set pooling size to be (2^pool_bits) */
    inline void set_maxpooling_size( int pool_bits );
    
    /* set the sigma^2 in gaussian unit */
    inline void set_sigma_sqr( float sigma_sqr );
};

/* implementation code */
#include "cuda_map_rbm.cu"
#endif
